import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:ball_lion/resources/colours.dart';
import 'package:ball_lion/widgets/base/wqs_button.dart';
import 'package:ball_lion/widgets/base/wqs_text.dart';

import 'package:ball_lion/entity/other/resource_entity.dart';
import 'package:ball_lion/utils/utils.dart';

class MatchVideoDialog extends StatefulWidget {
  final ResourceEntity res;
  const MatchVideoDialog(this.res, {super.key});

  @override
  State<MatchVideoDialog> createState() => _MatchVideoDialogState();
}

class _MatchVideoDialogState extends State<MatchVideoDialog> {
  @override
  Widget build(BuildContext context) {
    ResourceEntity res = widget.res;
    return Center(
      child: GestureDetector(
        onTap: () {
          // var jump = res.href;
          Get.back(result: true);
        },
        child: Container(
          width: res.dialogConfig?.imgW ?? 300,
          height: res.dialogConfig?.imgH ?? 374,
          decoration: BoxDecoration(
              image: DecorationImage(
                  fit: BoxFit.fill, image: NetworkImage(res.imgUrl ?? ''))),
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              SizedBox(height: res.dialogConfig?.cancelY),
              Row(
                children: [
                  SizedBox(width: res.dialogConfig?.cancelX),
                  QsButton(
                    onPressed: () {
                      Get.back();
                    },
                    backgroundColor: Colors.transparent,
                    width: res.dialogConfig?.cancelW,
                    height: res.dialogConfig?.cancelH,
                  )
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}
